package org.edu.service.impl;

import java.util.List;

import org.edu.dao.StudentLessonDao;
import org.edu.model.StudentLesson;
import org.edu.model.User;
import org.edu.service.StudentLessonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("studentLessonService")
public class StudentLessonServiceImpl implements StudentLessonService {

	@Autowired
	private StudentLessonDao studentLessonDao;
	public StudentLessonServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	@Transactional
	public void save(StudentLesson studentLesson) throws Exception {
		studentLessonDao.save(studentLesson);
	}

	@Transactional
	public void update(StudentLesson studentLesson) throws Exception {
		studentLessonDao.update(studentLesson);
	}

	@Transactional
	public void remove(StudentLesson studentLesson) throws Exception {
		studentLessonDao.remove(studentLesson);
	}

	@Transactional
	public List<StudentLesson> studentLessons() {
		return studentLessonDao.studentLessons();
	}

	@Transactional
	public StudentLesson findById(Long student_lesson_id) throws Exception {
		return studentLessonDao.findById(student_lesson_id);
	}

	@Transactional
	public List<StudentLesson> myLessonList(Long id) throws Exception {
		return studentLessonDao.myLessonList(id);
	}
}
